type num<T>={
    length:T,
    xxx:()=>void
}

let nums : num<number> = {
    length :29,
    xxx: () => {
    }
}
console.log(nums)


//接口

interface numbers<X,Y>{
    length:X,
    id:Y
}
let ress:numbers<number,String>={
    length:20,
    id:"Voldy"
}

console.log(ress)

let resss:numbers<{name?:String,place?:String},number>={
    length:{
        name:"Voldy"
    },
    id:9
}